import '../models/chat_message_entity.dart';
import '../models/chat_conversation_entity.dart';

/// 默认聊天数据
/// 围绕用户 admin 创建一些默认的聊天会话和消息
class DefaultChatDataCollection {
  static List<ChatConversationEntity> get defaultConversationList => [
    // 与 Bella 的对话
    ChatConversationEntity(
      conversationId: 'conv_001',
      participantId: 'user_002',
      participantName: 'Bella',
      participantAvatar: 'assets/images/avatar2.png',
      lastMessageContent: 'Call failed',
      lastMessageType: ChatMessageType.callFailedMessage,
      lastMessageTime: DateTime.now().subtract(const Duration(minutes: 15)),
      messageList: [
        ChatMessageEntity(
          messageId: 'msg_001',
          conversationId: 'conv_001',
          senderId: 'user_001',
          receiverId: 'user_002',
          messageType: ChatMessageType.textMessage,
          content:
              'Hi Bella! I saw your amazing 3D printed jewelry designs. Could you share some tips on creating intricate details?',
          timestamp: DateTime.now().subtract(const Duration(hours: 2)),
        ),
        ChatMessageEntity(
          messageId: 'msg_002',
          conversationId: 'conv_001',
          senderId: 'user_002',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'Hello Alex! Thank you for your interest. I use a 0.2mm nozzle and slow down the print speed to 30mm/s for fine details. What type of jewelry are you planning to create?',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 1, minutes: 45),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_003',
          conversationId: 'conv_001',
          senderId: 'user_001',
          receiverId: 'user_002',
          messageType: ChatMessageType.textMessage,
          content:
              'I want to create some custom earrings for my girlfriend. Do you have any recommendations for beginner-friendly designs?',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 1, minutes: 30),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_004',
          conversationId: 'conv_001',
          senderId: 'user_002',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'That\'s so sweet! I can send you some simple geometric earring designs. They work great with PLA and look elegant. Would you like me to call you to discuss the details?',
          timestamp: DateTime.now().subtract(const Duration(minutes: 20)),
        ),
        ChatMessageEntity(
          messageId: 'msg_005',
          conversationId: 'conv_001',
          senderId: 'user_001',
          receiverId: 'user_002',
          messageType: ChatMessageType.callFailedMessage,
          content: 'Call failed',
          timestamp: DateTime.now().subtract(const Duration(minutes: 15)),
        ),
      ],
    ),

    // 与 Chris 的对话
    ChatConversationEntity(
      conversationId: 'conv_002',
      participantId: 'user_003',
      participantName: 'Chris',
      participantAvatar: 'assets/images/avatar3.png',
      lastMessageContent: 'Call failed',
      lastMessageType: ChatMessageType.callFailedMessage,
      lastMessageTime: DateTime.now().subtract(const Duration(minutes: 5)),
      messageList: [
        ChatMessageEntity(
          messageId: 'msg_006',
          conversationId: 'conv_002',
          senderId: 'user_003',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'Hey Alex! I noticed you\'re working on some interesting 3D printing projects. Would you like to collaborate on a community workshop?',
          timestamp: DateTime.now().subtract(const Duration(hours: 3)),
        ),
        ChatMessageEntity(
          messageId: 'msg_007',
          conversationId: 'conv_002',
          senderId: 'user_001',
          receiverId: 'user_003',
          messageType: ChatMessageType.textMessage,
          content:
              'Hi Chris! That sounds amazing! I\'d love to help organize a workshop. What topics are you thinking of covering?',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 2, minutes: 45),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_008',
          conversationId: 'conv_002',
          senderId: 'user_003',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'I was thinking we could cover advanced slicing techniques and post-processing methods. Maybe we could also do a live printing demonstration?',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 2, minutes: 30),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_009',
          conversationId: 'conv_002',
          senderId: 'user_001',
          receiverId: 'user_003',
          messageType: ChatMessageType.textMessage,
          content:
              'Perfect! I have some great examples of post-processing techniques. Should we schedule a call to plan the details?',
          timestamp: DateTime.now().subtract(const Duration(minutes: 10)),
        ),
        ChatMessageEntity(
          messageId: 'msg_010',
          conversationId: 'conv_002',
          senderId: 'user_001',
          receiverId: 'user_003',
          messageType: ChatMessageType.callFailedMessage,
          content: 'Call failed',
          timestamp: DateTime.now().subtract(const Duration(minutes: 5)),
        ),
      ],
    ),

    // 与 Emma 的对话
    ChatConversationEntity(
      conversationId: 'conv_003',
      participantId: 'user_005',
      participantName: 'Emma',
      participantAvatar: 'assets/images/avatar5.png',
      lastMessageContent: 'Thanks for the advice!',
      lastMessageType: ChatMessageType.textMessage,
      lastMessageTime: DateTime.now().subtract(const Duration(hours: 1)),
      messageList: [
        ChatMessageEntity(
          messageId: 'msg_011',
          conversationId: 'conv_003',
          senderId: 'user_005',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'Hi Alex! I saw your post about troubleshooting layer adhesion issues. I\'m having the same problem with my prints. Any suggestions?',
          timestamp: DateTime.now().subtract(const Duration(hours: 4)),
        ),
        ChatMessageEntity(
          messageId: 'msg_012',
          conversationId: 'conv_003',
          senderId: 'user_001',
          receiverId: 'user_005',
          messageType: ChatMessageType.textMessage,
          content:
              'Hi Emma! Layer adhesion issues can be tricky. What material are you using? And have you checked your bed temperature and leveling?',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 3, minutes: 45),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_013',
          conversationId: 'conv_003',
          senderId: 'user_005',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'I\'m using PETG at 240°C. My bed is at 80°C and I think it\'s leveled correctly. The first few layers stick fine, but then it starts to warp.',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 3, minutes: 30),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_014',
          conversationId: 'conv_003',
          senderId: 'user_001',
          receiverId: 'user_005',
          messageType: ChatMessageType.textMessage,
          content:
              'Ah, PETG warping! Try reducing your bed temperature to 70°C and increase the cooling fan speed after the first few layers. Also, make sure your print speed isn\'t too fast.',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 3, minutes: 15),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_015',
          conversationId: 'conv_003',
          senderId: 'user_005',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'Thanks for the advice! I\'ll try those settings. I\'ll let you know how it goes!',
          timestamp: DateTime.now().subtract(const Duration(hours: 1)),
        ),
      ],
    ),

    // 与 Frank 的对话
    ChatConversationEntity(
      conversationId: 'conv_004',
      participantId: 'user_006',
      participantName: 'Frank',
      participantAvatar: 'assets/images/avatar6.png',
      lastMessageContent: 'Call failed',
      lastMessageType: ChatMessageType.callFailedMessage,
      lastMessageTime: DateTime.now().subtract(const Duration(minutes: 30)),
      messageList: [
        ChatMessageEntity(
          messageId: 'msg_016',
          conversationId: 'conv_004',
          senderId: 'user_006',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'Alex, I need your expertise on a complex architectural model I\'m printing. The overhangs keep failing. Can you help?',
          timestamp: DateTime.now().subtract(const Duration(hours: 6)),
        ),
        ChatMessageEntity(
          messageId: 'msg_017',
          conversationId: 'conv_004',
          senderId: 'user_001',
          receiverId: 'user_006',
          messageType: ChatMessageType.textMessage,
          content:
              'Hi Frank! Architectural models can be challenging. Are you using supports? What\'s the angle of your overhangs?',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 5, minutes: 45),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_018',
          conversationId: 'conv_004',
          senderId: 'user_006',
          receiverId: 'user_001',
          messageType: ChatMessageType.textMessage,
          content:
              'I\'m using tree supports, but they\'re not working well. The overhangs are around 60-70 degrees. The model is quite detailed with lots of small features.',
          timestamp: DateTime.now().subtract(
            const Duration(hours: 5, minutes: 30),
          ),
        ),
        ChatMessageEntity(
          messageId: 'msg_019',
          conversationId: 'conv_004',
          senderId: 'user_001',
          receiverId: 'user_006',
          messageType: ChatMessageType.textMessage,
          content:
              'For detailed architectural models, I\'d recommend using regular supports with a support interface. Also, try reducing your layer height to 0.1mm for better detail. Want to discuss this over a call?',
          timestamp: DateTime.now().subtract(const Duration(minutes: 35)),
        ),
        ChatMessageEntity(
          messageId: 'msg_020',
          conversationId: 'conv_004',
          senderId: 'user_001',
          receiverId: 'user_006',
          messageType: ChatMessageType.callFailedMessage,
          content: 'Call failed',
          timestamp: DateTime.now().subtract(const Duration(minutes: 30)),
        ),
      ],
    ),
  ];
}
